package cn.edu.csust.coursecard.service;

import cn.edu.csust.coursecard.dao.entity.StuInfo;
import cn.edu.csust.coursecard.common.ReturnData;
import cn.edu.csust.coursecard.dao.dto.UserInfo;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;

/**
 * @author zsw
 * @descirption
 * @date 2019/11/18 18:52
 */
public interface StuInfoService {

    /**
     * 登录
     * @param stuNum
     * @param password
     * @return
     */
    ReturnData loginThroughJW(String stuNum, String password, String version);

    ReturnData getBasicData(String cookie);
    /**
     * 考试安排
     * @param cookie
     * @param xueqi
     * @return
     */
    ReturnData getExamArrangement(String cookie,String  xueqi);

    /**
     * 查询成绩
     * @param cookie
     * @param xueqi
     * @return
     */
    ReturnData getScoreList(String cookie, @RequestParam("xueqi") String xueqi);


    /**
     *
     * 查询平时成绩
     * @param cookie
     * @param pscjUrl
     * @return
     */
    ReturnData getScoreDetail(String cookie, String pscjUrl);


    /**
     * 获取所有学期
     * @param request
     * @return
     */
    ReturnData getAllTermList(HttpServletRequest request, String cookie);

    /**
     * 获取周一和日期的对应
     * @param cookie
     * @return
     */
    ReturnData getWeekDate(String cookie);

    ReturnData getCourse(String cookie, String xueqi, Integer zc);

    ReturnData getWeekCourse(String cookie, String weekTime);

    String getStudentAvatar(Integer id, String cookie);

    ReturnData setStudentAvatar(HttpServletRequest request, MultipartFile file);

    String restoreJwAvatar(Integer id, String cookie, int flag);

    StuInfo refreshStuInfoFromJW(Integer id, String cookie, String password, String version);

    StuInfo getStuInfoFromDB(Integer selfUserId, Integer userId, String cookie);

    ReturnData setStuInfo(HttpServletRequest request, StuInfo stuInfo);

    ReturnData getNoticeListFromJW(String cookie);

    ReturnData getNoticeDetail(String cookie, String ggid);

    UserInfo getUserInfo(Integer userId);

    void solveNewStudentMistake();

}
